package cn.com.ahao.client.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class FirstApiConsumerController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/echo")
    public String echo() {
        return "nacos " + restTemplate.getForObject("http://nacos-demo/firstApi/sayHello", String.class);
    }

}
